//
//  UILabel+Font.m
//  VideoPic
//
//  Created by apple on 16/3/24.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "UILabel+Font.h"
#import "CheckDevice.h"
@implementation UILabel (Font)

- (void)handleFont:(FontType)type {
    switch ([CheckDevice getCurrentDevice]) {
        case iPhoneFivePointFiveInch:{
            if (type == FontTypeSmall)
                [self handleWithSize:19];
            else
                [self handleWithSize:20];
            break;
        }
        case iPhoneFourPointSevenInch:{
            if (type == FontTypeSmall)
                [self handleWithSize:17];
            else
                [self handleWithSize:17];
            break;
        }
        case iPhoneFourInch:{
            if (type == FontTypeSmall)
                [self handleWithSize:15];
            else
                [self handleWithSize:17];
            break;
        }
        case iPhoneThreePointFiveInch:{
            if (type == FontTypeSmall)
                [self handleWithSize:12];
            else
                [self handleWithSize:15];
            break;
        }
        default:
            break;
    }
}

- (void)handleWithSize:(CGFloat)size {
    self.font = [UIFont systemFontOfSize:size];
}


@end
